import java.io.*;
import java.net.Socket;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;


public class ClientManager extends Thread {
	private PrintWriter out;
	private ChatQueue chatqueue;
	private String message;
	private Socket socket;

	
	public ClientManager(String msg, String usr) { 
		this.message = msg;
		try {
			socket = new Socket(usr, 8888);
			out = new PrintWriter(socket.getOutputStream(), true);
	
		} catch(IOException e) {
			System.out.println("Error with I/O");
		}
	}
	
	public void run() { 
		try { 
			out.write(message);
			socket.close();
			out.close();
		} catch(IOException e) { 
			System.out.println("Error with I/O");
		}
	}
	
}
